package cn.tedu.service;

import cn.tedu.mapper.DeptMapper;
import cn.tedu.pojo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImp implements DeptService{
    @Autowired
    private DeptMapper deptMapper;
    public List<Dept> findAll() {
        return deptMapper.findAll();
    }

    public void changeState(int state,String deptId) {
        deptMapper.changeState(state,deptId);
    }

    public void deleteDeptByIds(String[] deptIds) {
        deptMapper.deleteDeptByIds(deptIds);
    }

    public void saveDept(Dept dept) {
        deptMapper.saveDept(dept);
    }

    public Dept findOneById(String deptId) {
        return deptMapper.findOneById(deptId);
    }

    public void updateDept(Dept dept) {
        deptMapper.updateDept(dept);
    }
}
